function dupli(arr) {
  let map1 = new Map();
  for (let i of arr) {
    map1.set(i, map1.get(i) ? map1.get(i) + 1 : 1);
  }
  let obj = {};
  for (let [key, value] of map1) {
    if (value > 1) {
      obj[key] = true;
    } else {
      obj[key] = false;
    }
  }
  return obj;
}
let arr = ["a", "b", "v", "a"];
let res = dupli(arr);
console.log(res);
